home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 5 / Example 5.5 / object.h < prev   
Encoding:
C/C++ Source or Header  |  2006-06-29  |  669 b   |  35 lines

  1. #ifndef RTS_OBJECT
  2. #define RTS_OBJECT
  3.  
  4. #include <d3dx9.h>
  5. #include <vector>
  6. #include "debug.h"
  7. #include "mesh.h"
  8. #include "camera.h"
  9.  
  10. HRESULT LoadObjectResources(IDirect3DDevice9* Device);
  11. void UnloadObjectResources();
  12.  
  13. class OBJECT{
  14.     public:
  15.         OBJECT();
  16.         OBJECT(int t, D3DXVECTOR3 pos, D3DXVECTOR3 rot, float off);
  17.         void Render();
  18.         void Update(float deltaTime);
  19.         void UpdateCameras();
  20.  
  21.         MESHINSTANCE m_meshInstance;
  22.         int m_type;
  23.  
  24.         //Animation variables
  25.         int m_activeWP, m_nextWP;
  26.         float m_prc, m_speed, m_offset;
  27.  
  28.         //Camera variables
  29.         std::vector<CAMERA> m_cameras;
  30.         int m_activeCam;
  31.         D3DXVECTOR3 m_direction;
  32. };
  33.  
  34.  
  35. #endif